package com.dalianpai.gulimall.cart.service;

import com.dalianpai.gulimall.cart.vo.Cart;
import com.dalianpai.gulimall.cart.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @author WGR
 * @create 2020/7/22 -- 20:50
 */
public interface CartService {
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    CartItem getCartItem(Long skuId);

    Cart getCart() throws ExecutionException, InterruptedException;

    void clearKey(String cartKey);

    void checkItem(Long skuId, Integer check);

    void checkCount(Long skuId, Integer num);

    void deleteItem(Long skuId);

    List<CartItem> getUserCartItems();
}
